<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" >
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head>

<body><?php
$mysql_server_name = "localhost";
$mysql_username = "root";
$mysql_password = "root";
$mysql_database = "db_shop";
$conn=mysql_connect($mysql_server_name,$mysql_username,$mysql_password);
mysql_select_db($mysql_database);

?>

<script language='javascript'>
    function checkpost() {
     if(myform.name.value=='') {
      alert('请输入用户名!');
      myform.name.focus();
      return false;
      }
     if(myform.pwd.value=='') {
      alert('请输入原密码!');
      myform.pwd.focus();
      return false;
      }
     if(myform.npwd.value=='') {
      alert('请输入新密码!');
      myform.npwd.focus();
      return false;
      }
     if(myform.npwd1.value=='') {
      alert('请再次输入新密码!');
      myform.npwd1.focus();
      return false;
      }
}
</script>

<form action='updatepsw_add.php' method='post' name='myform' onsubmit='return checkpost();'>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;用户名：<input type='text' name='name'><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;原密码：<input type='password' name='pwd'><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;新密码：<input type='password' name='npwd'><br>
&nbsp;再次输入新密码：<input type='password' name='npwd1'>&nbsp;&nbsp;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;<input type='submit' name='submit' value='确认'>
&nbsp;&nbsp;<input type='reset' name='reset' value='取消'><br>
</form>


</body>
</html>
